package com.InvoicingSystem.controller;

import java.util.List;
import java.util.Map;

import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import com.InvoicingSystem.pojo.Product;
import com.InvoicingSystem.service.ProductServices;



@Controller
@RequestMapping("/product/")
public class ProductController {
	
	@Autowired
	private ProductServices productServices;
	
	
	@RequestMapping("findAll")
	public String findProcutAll(Map<String, Object> map){
		
		List<Product> list =productServices.findAll();
		
		map.put("productList", list);
		
		return "add";//返回添加的页面  add是页面   添加页面！！！
	}

}
